using System;
using System.Data;
using Firestarter.DB.Schema.Logic;
using NUnit.Framework;

namespace Firestarter.DB.Schema.Test.Logic
{
    [Ignore("Awaiting implementation from Forum user")] //TODO Brett 13 Jul 2010: Ignored Test - Awaiting implementation from Forum user
    [TestFixture]
    public class TestDBReverseEng_GetSchema_SQLite : TestDBReverseEng_GetSchema
    {
        [TestFixtureSetUp]
        public override void SetupFixture()
        {
            base.SetupFixture();
        }

        [SetUp]
        public override void SetupTest()
        {
            //if (_idbConnection != null)
            //{
            //    _idbConnection.Close();
            //    _idbConnection.Dispose();
            //}
            _testUtilsDb = CreateSchemaTestDbUtil();
            Console.WriteLine("Creating Test database for SQLite");
            _testUtilsDb.CreateTestDatabase();
            _connection = _testUtilsDb.CreateTestDBConnection();
        }

        protected override TestUtilsDB CreateSchemaTestDbUtil()
        {
            return new TestUtilsDB_SQLite();
        }


        protected override CreateTableSqlBuilder GetSqlBuilderCreateTable(string tableName)
        {
            return new CreateTableSqlBuilder_SQLite(tableName);
        }
/*
        protected override void DropTable(DBTable referencedDBTable, IDbConnection connection)
        {
            //                        base.DropTable(referencedDBTable, connection);
        }*/

        protected override DBSchemaExtractor GetDbSchemaExtractor(IDbConnection idbConnection)
        {
            return new DBSchemaExtractorSQLite(idbConnection);
        }
    }
}